using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TraceMonitor
{
    public partial class frmSettings : Form
    {
        public frmSettings()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Program.SetConfig(Program.CONFIG_IPADDRESS, txtIpAddress.Text);
            Program.SetConfig(Program.CONFIG_PORT, txtPort.Text);
            this.Close();
        }

        private void frmSettings_Load(object sender, EventArgs e)
        {
            txtIpAddress.Text = Program.GetConfig(Program.CONFIG_IPADDRESS);
            txtPort.Text = Program.GetConfig(Program.CONFIG_PORT);
        }
    }
}